﻿@model ServiceCase

<form action='@Url.Action("Edit")' method="post" class="editForm">
<div style="height: 40px; line-height: 40px; padding: 0 10px;">
    <div class="pull-left" style="height: 40px; line-height: 40px;">
        <h2 id="bigTitle">
            @ViewBag.Title
        </h2>
    </div>
</div>
<hr />
<div class="row" style="margin-top: 20px;">
    <div class="span1">
        标题：
    </div>
    <div class="span11">
        @Html.TextBoxFor(x => x.Name)
    </div>
</div>
<div class="row" style="margin-top: 20px;">
    <div class="span1">
        类别：
    </div>
    <div class="span11">
        @if (ViewBag.CateList != null)
        {
            @Html.DropDownListFor(x => x.Cate.ID, new SelectList((IEnumerable<BaseCate>)ViewBag.CateList,"ID","Name",Model.Cate == null ? null: (object)Model.Cate.ID), "选择...");
        }
    </div>
</div>
<div class="row" style="margin-top: 20px;">
    <div class="span1">
        正文：
    </div>
    <div class="span11">
        <textarea id="htmlContent" name="htmlContent" class="htmledit" cols="100" rows="8"
            style="visibility: hidden; height: 500px;">
            @ViewBag.HtmlContent
            </textarea>
    </div>
</div>
@Html.ValidationSummary()
<div class="row" style="margin-top: 20px;">
    <div class="span2 offset5">
        <input type="submit" id="Button1" class="btn  btn-primary  btn-large" value="保存" />
    </div>
    <div class="span2">
        <a href="@Url.Action("List")" class="btn btn-info  btn-large"><i class="icon-th-list icon-white">
        </i>返回列表</a>
    </div>
</div>
</form>
@section scripts{
    <script type="text/javascript">

        $("#Time").datepicker($.datepicker.regional["zh-CN"]);

        KindEditor.ready(function (K) {
            var editor1 = K.create('#htmlContent', {
                uploadJson: '@Url.Content("~/Content/kindeditor-4.1/asp.net/upload_json.ashx")',
                fileManagerJson: '@Url.Content("~/Content/kindeditor-4.1/asp.net/file_manager_json.ashx")',
                allowFileManager: true,
                items: [
						'fontname', 'fontsize', 'formatblock', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', 'lineheight', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']
            });
        });



    </script>
}
